We talked about OAuth last time, SAML has often discussed along with OAuth. They are kind of related yet have the different purposes. SAML’s focus is on the Authentication whereas OAuth has its focus on Authorization. SAML tries to provide the service with one ID (identity-as-a-service). Security Assertion Markup Language (SAML) is an open standard for exchanging authorization and authentication information between domains using standardized XML. SAML is brought to us by OASIS’s security service technical committee for handling SSO issues. SAML Profile with Redirect/POST bindings is one of the most common SSO (Single Sign On) implementation. SSO did not have many problems within the intranet. However, it required an SSO standard that works over the full internet. Keep in mind both OAuth and SAML is a concept/framework.
We had days when the network wasn’t even setup/connected and we authenticated through the actual device or system which had the id and key information stored to validate. Then we were introduced to the network/the internet. Things were still the same, we would punch in username and password to the system that we are trying to gain access. However, there were many cons for doing this. For example, we had to keep username/password for each system. Also, it was fairly responsible for the system administrators spent countless hours trying to update/delete the username/password when someone leaves the company. Things were even uglier when there was a severe security measure. With an introduction to the SSO, we only had to manage username/password in one place.
In the beginning of World Wide Web, websites were very simple and static. And SSO (Single Sign On) used to be treated as a redundant extra idea then. However, as the internet evolved along with WWW, things became much more complex. It is common for an identity to host multiple websites. It’d be much hassle to login for each website just because they are in different locations. SAML is a very important standard for this to happen. I would say this is the key concept of the “authentication”.
SAML is built upon a number of existing standards:
The primary SAML use case is called Web Browser Single Sign-On (SSO). A user wielding a user agent (usually a web browser) requests a web resource protected by a SAML service provider. The service provider, wishing to know the identity of the requesting user, issues an authentication request to a SAML identity provider through the user agent. The resulting protocol flow is depicted in the following diagram:
![]() |
<form method="post" action="https://sp.example.com/SAML2/SSO/POST" ...>
<input type="hidden" name="SAMLResponse" value="response" />
...
<input type="submit" value="Submit" />
</form>
OAuth2 | SAML | |
---|---|---|
Token (or assertion) format | JSON or SAML2 | XML |
Authorization? | Yes | Yes |
Authentication? | Pseudo-authentication | Yes |
Year created | 2005 | 2001 |
Current version | OAuth2 | SAML 2.0 |
Security Risks | Phishing | HTTP Redirect (GET) binding |
OAuth 2.0 does not support signature | SAML SOAP binding | |
encryption | HTTP POST binding | |
channel binding | XML Signature Wrapping to | |
channel binding | impersonate any user | |
client verification. | ||
It relies completely on TLS for confidentiality. | ||
Transport | HTTP | HTTP |
Best suited for | API authorization | Single Sign On |